package vip.finance.makemoney.config;


import vip.finance.makemoney.common.vo.UserInfo;

public class UserContext {
    private static final ThreadLocal<UserInfo> workerLocal = new ThreadLocal<>();

    public UserContext() {
    }

    public static UserInfo currentUserInfo() {
        return (UserInfo) workerLocal.get();
    }

    public static void setUserInfo(UserInfo user) {
        workerLocal.set(user);
    }

    public static void removeUserInfo() {
        workerLocal.remove();
    }
}
